#!/usr/bin/env python3
"""
AI Assistant Application
主程序入口文件，负责启动浮动AI助手窗口应用程序。
"""

import sys
import logging
from PyQt6.QtWidgets import QApplication
from floating_window import FloatingAIAssistant

# 配置日志
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)

def main():
    """启动应用程序的主函数"""
    try:
        app = QApplication(sys.argv)
        ex = FloatingAIAssistant()
        logger.info("AI Assistant 应用程序已启动")
        return app.exec()
    except Exception as e:
        logger.error(f"启动应用程序时发生错误: {str(e)}")
        return 1

if __name__ == '__main__':
    sys.exit(main()) 